package com.demo.controller;

import com.demo.ResponseResult;
import com.demo.domain.entity.PersonalInformation;
import com.demo.service.PersonalInformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin(origins = "*")
public class PersonInfoController {
    @Autowired
    private PersonalInformationService personalInformationService;
    @GetMapping("/personinfo")
    public ResponseResult PersonInfo(){
        return personalInformationService.PersonalInfo();
    }
    @PostMapping("/personinfo")
    public ResponseResult PersonInfo(@RequestBody PersonalInformation personalInformation){
        return personalInformationService.updateInfo(personalInformation);
    }
    //查找所有中转站人员的位置
    @GetMapping("/areainfo")
    public ResponseResult areainfo(){
        return personalInformationService.areainfo();
    }


}
